<%@ page language="java" import="java.util.*"  pageEncoding="utf-8"  contentType="text/html; charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/meta.jsp"%>
<%@ include file="/commons/easyUI.jsp" %>
<html>
<head>
<title>修改个人信息系统</title>
<script type="text/javascript">
	function updateMyInfo(){
	$("#repwdForm").form("submit",{  //做提交动作
		url:"user_updateUser.action", 
		success:function(data){//当表单提交成功之后的回调函数
			if(data){
				$.messager.alert("系统提示","修改成功");
				location.href="user_infoManage.action";
			}
		}
	});
}
</script>
</head>
<body style="margin:0px">
	<div id="myInfo" data-options="closed:false,buttons:'#updateMyInfo-buttons'"  style="width: 500px; margin: auto auto;"  align="center" >
	<form id="repwdForm" method="post" >
		<fieldset >
			<legend> 个人信息设置 </legend>
			<table data-options="cellspacing:8px">
	 			<tr hidden="true">
	 				<td>用户账号：</td>
	 				<td><input id="userId" name="userDto.userId"  class="easyui-textbox"   readonly="readonly" value="${currentUser.id}" style="width:250px;height:30px;"/></td>
	 			</tr> 
	 			<tr>
	 				<td>用户账号：</td>
	 				<td><input id="username" name="userDto.username"  class="easyui-textbox"   readonly="readonly" value="${currentUser.username}" style="width:250px;height:30px;"/></td>
	 			</tr>  
	 			<tr>
	 				<td>用户姓名：</td>
	 				<td><input id="name" name="userDto.name"  class="easyui-textbox ;easyui-validatebox"  value="${currentUser.name}" data-options="required:true" style="width:250px;height:30px;"/></td>
	 			</tr>  
	 			<tr>
	 				<td>部门：</td>
	 				<td><input class="easyui-textbox" id="dept" name="userDto.dept"  type="text" readonly="readonly" required="required" value="${currentUser.dept.name}" style="width:250px;height:30px;"/></td>
	 			</tr>
	 			<tr>
	 				<td>系统角色：</td>
	 				<td><input class="easyui-textbox" id="role" name="userDto.role"  type="text" readonly="readonly" required="required" value="${currentUser.role.name}" style="width:250px;height:30px;"/></td>
	 			</tr>   
	 			<tr>
	 				<td>性别：</td>
	 				<td>
	 					<select class="easyui-combobox" id="sex" name="userDto.sex" style="width: 154px;" data-options="editable:false,panelHeight:'auto'">
	 						<c:if test="${currentUser.sex == '男'}">
	 							<option value="男" selected="selected">男</option>
	 							<option value="女">女</option>
	 						</c:if>
	 						<c:if test="${currentUser.sex == '女'}">
	 							<option value="男">男</option>
	 							<option value="女" selected="selected">女</option>
	 						</c:if>
	 					</select>
	 				</td>
	 			</tr>
	 			<tr>
	 				<td>专业：</td>
	 				<td><input id="major" name="userDto.major"  class="easyui-textbox "  value="${currentUser.major}" style="width:250px;height:30px;"/></td>
	 			</tr>  
	 			<tr>
	 				<td>学历：</td>
	 				<td><input id="edu" name="userDto.edu"  class="easyui-textbox "  value="${currentUser.edu}"  style="width:250px;height:30px;"/></td>
	 			</tr>
	 			<tr>
	 				<td>学校：</td>
	 				<td><input id="school" name="userDto.school"  class="easyui-textbox "  value="${currentUser.school}" style="width:250px;height:30px;"/></td>
	 			</tr>
 			</table>
 	</fieldset>
 	</form>
 	</div>
 	<div id="updateMyInfo-buttons" align="center">
 		<br/>
		<a href="javascript:updateMyInfo()" class="easyui-linkbutton"  data-options=" iconCls:'icon-ok'">保存修改</a>
 		<a href="user_infoManage.action"  class="easyui-linkbutton"  data-options=" iconCls:'icon-cancel'">取消修改</a>
	</div>
</body>
</html>